package com.hsylient.Proxypattern.staticproxy;

public class Cat {

    private Worker worker;

    public Cat(Worker worker) {
        this.worker = worker;
    }

    public void xxx() {
        System.out.println("xxxx");
        worker.work();
        System.out.println("yyyyy");
    }

    public static void main(String[] args) {
        Cat cat = new Cat(new Worker());
        cat.xxx();
    }
}
